<div class="hot_container" >
  <div class="title"><span class='title_content'>订单列表</span></div>
  <table class="admin"  cellpadding="0" cellspacing="0" >
    <thead>
      <th>编号</th>
      <th>下单时间</th>
      <th>总金额</th>
      <th>下单人</th>
      <th>状态</th>
      <th colspan="3"></th>
    </thead>
    <% for order in @orders %>
      <tr>
        <td><%= order.id%></td>
        <td><%= order.created_at.strftime("%y-%m-%d %I:%M%p") %></td>
        <td><%= number_to_currency(order.total_price,:unit => "&yen;")%></td>
        <td><%= order.user.login %></td>
        <td><%= format_status(order.status) %></td>
        <td><%= link_to '明细', order %></td>
        <% if merchandiser? %>
          <td><%= link_to '编辑', edit_order_path(order) %></td>
          <td><%= link_to '取消', order, :confirm => 'Are you sure?', :method => :delete %></td>
        <% end %>
      </tr>
    <% end %>
  </table>

  <br />
  <%= will_paginate @orders,:prev_label => '«上一页',:next_label => '下一页»' %>
</div>